import css from './login.css'
import {Vue,axios,navigation,commonVue,loadsection} from '../../assets/js/base.js';
import login from  '../../API/login.js';

new Vue({
    el: '#main',
    data:{
      fullScreen:false,//是否全屏
      currentMenu:"login.html",//当前菜单
      tableLoading:false,
      pageState:false,
      options:{
        username:"",//用户名
        pwd:"",//密码
      },
      loadSection:false,
    },
    mounted:function(){
    },
    methods:{
      globalEvent:function(){
        commonVue.$emit('navSelected');
      },
      checkPermission(){
        return true;
      },
      login() {
          this.tableLoading = true;
          login(this.options).then(data => {
            this.tableLoading = false;
            window.location.href = "./index.html";
          }).catch(message => {
            this.tableLoading = false;
            this.$Message({
                message
            });
          });
      },
    },
    components: {
      navigation,
      loadsection
    }
})
